<template>
	<div id="app" :class="[appClass]">
		<transition
			:enter-active-class="enterAnimation"
			:leave-active-class="leaveAnimation"
		>
			<keep-alive :include="keepAlive">
				<router-view class="router-view"></router-view>
			</keep-alive>
		</transition>
		<Tarbar></Tarbar>
	</div>
</template>

<script>
import Tarbar from './components/tarbar/tarbar'

import {mapState} from 'vuex';
import Vue from 'vue'

export default {
	components: {
		Tarbar,
	},
	data() {
		return {
			appClass: '',
		}
	},
	computed: mapState({
		keepAlive: function (state) {
			return state.common.keepArray + "";
		},
		enterAnimation: function (state) {
			return state.common.pageAnimation.enter;
		},
		leaveAnimation: function (state) {
			return state.common.pageAnimation.leave;
		}
	}),
	created() {
		// this.setLogin(false);
		// this.$router.replace('/');
		global.URLROUTERS = this.myrouters;
		let arr = ['','D', 'L', '客', '户', '系', '统'];
		for (var x = 1; x < arr.length; x++) {
			arr[0] += '%c' + arr[x];
			arr[x] = 'color:#' + Math.random().toFixed(3) * 1000 + ';font-size:50px;text-shadow:5px 5px 5px #DCDFE6;'
		}
		console.log.apply(console, arr)
		if (localStorage.getItem("login_flag")) {
			// this.ServerAPI.testAPI()
		}
		
		
	},
	methods: {}
}
</script>

<style lang="scss" scoped>
#app {
	width: 100%;
	font-size: 14px;
	font-family: PingFang-SC-Medium;
	// height:100%
}
</style>
